package com.zxp.mall.order.feign;


import com.zxp.mall.common.utils.R;
import com.zxp.mall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("mall-ware")
public interface WareFeignService {

    //    查询sku是否有库存
    @PostMapping("/ware/waresku/hastock")
    public R getSkusHasStock(@RequestBody List<Long> skuIds);
    
    @GetMapping("/ware/wareinfo/fare")
    public R getFare(@RequestParam("addrId") Long addrId);

    //    订单锁库存
    @PostMapping("/ware/waresku/lock/order")
    public R orderLockStock(@RequestBody WareSkuLockVo vo);

}
